// ==UserScript==
// @name         400x400转800x800
// @namespace    pacey
// @version      0.1
// @description  try to take over the world!
// @updateURL    https://gitee.com/great-pacey/tampermonkey/raw/master/imageSize.user.js
// @author       pacey
// @match        *://ae01.alicdn.com/*
// @match        *://cbu01.alicdn.com/*
// @match        https://cbu01.alicdn.com/*
// @icon         https://www.google.com/s2/favicons?domain=aliexpress.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const reg = /.webp$/;
    let flag = false;
    let url = location.href
    if (location.href.match(reg)) {
        url = location.href.replace(reg, '.jpg');
        flag = true;
    }
    const reg2 = /400x400\.jpg/
    if (location.href.match(reg2)) {
        url = url.replace(reg2, '800x800.jpg');
        flag = true;
    }
    if (!flag) return;
    window.location.href = url;
})();